
const detailCommon = {
	/**
     * 根据属性ID、roleCd 获取formdata 项
     */
	getItemByAttrIdRolcd(attrId,roleCd,formData){
			let rtnItem={};
			for (let key in formData) {
			  let item = formData[key];
			  if(roleCd!=undefined&&roleCd!=null&&roleCd!=''){
				if(item.id==attrId&&item.attrRoleCd==roleCd)
				{
					rtnItem=item;
					break;
				}
			  }else if(item.id==attrId&&!item.attrRoleCd){
					rtnItem=item;
					break;
			  }
			}      
			return rtnItem;
	  
	},
	/**
	* 数据项设置值
	*/
	setItemVal(item,val){
		if(item!=undefined&&item!=null&&item!=''&&val!=undefined){
			item.value=val;
		}
	}
};
export default detailCommon;
